Optimal. Leaf size=188 \[ -\frac{2 b \sin (c) \text{CosIntegral}(d x)}{a^3}+\frac{2 b \sin \left (c-\frac{a d}{b}\right ) \text{CosIntegral}\left (\frac{a d}{b}+d x\right )}{a^3}+\frac{d \cos \left (c-\frac{a d}{b}\right ) \text{CosIntegral}\left (\frac{a d}{b}+d x\right )}{a^2}-\frac{d \sin \left (c-\frac{a d}{b}\right ) \text{Si}\left (x d+\frac{a d}{b}\right )}{a^2}-\frac{2 b \cos (c) \text{Si}(d x)}{a^3}+\frac{2 b \cos \left (c-\frac{a d}{b}\right ) \text{Si}\left (x d+\frac{a d}{b}\right )}{a^3}-\frac{b \sin (c+d x)}{a^2 (a+b x)}+\frac{d \cos (c) \text{CosIntegral}(d x)}{a^2}-\frac{d \sin (c) \text{Si}(d x)}{a^2}-\frac{\sin (c+d x)}{a^2 x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.513687, antiderivative size = 188, normalized size of antiderivative = 1., number of steps used = 16, number of rules used = 5, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.294, Rules used = {6742, 3297, 3303, 3299, 3302} \[ -\frac{2 b \sin (c) \text{CosIntegral}(d x)}{a^3}+\frac{2 b \sin \left (c-\frac{a d}{b}\right ) \text{CosIntegral}\left (\frac{a d}{b}+d x\right )}{a^3}+\frac{d \cos \left (c-\frac{a d}{b}\right ) \text{CosIntegral}\left (\frac{a d}{b}+d x\right )}{a^2}-\frac{d \sin \left (c-\frac{a d}{b}\right ) \text{Si}\left (x d+\frac{a d}{b}\right )}{a^2}-\frac{2 b \cos (c) \text{Si}(d x)}{a^3}+\frac{2 b \cos \left (c-\frac{a d}{b}\right ) \text{Si}\left (x d+\frac{a d}{b}\right )}{a^3}-\frac{b \sin (c+d x)}{a^2 (a+b x)}+\frac{d \cos (c) \text{CosIntegral}(d x)}{a^2}-\frac{d \sin (c) \text{Si}(d x)}{a^2}-\frac{\sin (c+d x)}{a^2 x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6742
Rule 3297
Rule 3303
Rule 3299
Rule 3302
Rubi steps
\begin{align*} \int \frac{\sin (c+d x)}{x^2 (a+b x)^2} \, dx &=\int \left (\frac{\sin (c+d x)}{a^2 x^2}-\frac{2 b \sin (c+d x)}{a^3 x}+\frac{b^2 \sin (c+d x)}{a^2 (a+b x)^2}+\frac{2 b^2 \sin (c+d x)}{a^3 (a+b x)}\right ) \, dx\\ &=\frac{\int \frac{\sin (c+d x)}{x^2} \, dx}{a^2}-\frac{(2 b) \int \frac{\sin (c+d x)}{x} \, dx}{a^3}+\frac{\left (2 b^2\right ) \int \frac{\sin (c+d x)}{a+b x} \, dx}{a^3}+\frac{b^2 \int \frac{\sin (c+d x)}{(a+b x)^2} \, dx}{a^2}\\ &=-\frac{\sin (c+d x)}{a^2 x}-\frac{b \sin (c+d x)}{a^2 (a+b x)}+\frac{d \int \frac{\cos (c+d x)}{x} \, dx}{a^2}+\frac{(b d) \int \frac{\cos (c+d x)}{a+b x} \, dx}{a^2}-\frac{(2 b \cos (c)) \int \frac{\sin (d x)}{x} \, dx}{a^3}+\frac{\left (2 b^2 \cos \left (c-\frac{a d}{b}\right )\right ) \int \frac{\sin \left (\frac{a d}{b}+d x\right )}{a+b x} \, dx}{a^3}-\frac{(2 b \sin (c)) \int \frac{\cos (d x)}{x} \, dx}{a^3}+\frac{\left (2 b^2 \sin \left (c-\frac{a d}{b}\right )\right ) \int \frac{\cos \left (\frac{a d}{b}+d x\right )}{a+b x} \, dx}{a^3}\\ &=-\frac{2 b \text{Ci}(d x) \sin (c)}{a^3}+\frac{2 b \text{Ci}\left (\frac{a d}{b}+d x\right ) \sin \left (c-\frac{a d}{b}\right )}{a^3}-\frac{\sin (c+d x)}{a^2 x}-\frac{b \sin (c+d x)}{a^2 (a+b x)}-\frac{2 b \cos (c) \text{Si}(d x)}{a^3}+\frac{2 b \cos \left (c-\frac{a d}{b}\right ) \text{Si}\left (\frac{a d}{b}+d x\right )}{a^3}+\frac{(d \cos (c)) \int \frac{\cos (d x)}{x} \, dx}{a^2}+\frac{\left (b d \cos \left (c-\frac{a d}{b}\right )\right ) \int \frac{\cos \left (\frac{a d}{b}+d x\right )}{a+b x} \, dx}{a^2}-\frac{(d \sin (c)) \int \frac{\sin (d x)}{x} \, dx}{a^2}-\frac{\left (b d \sin \left (c-\frac{a d}{b}\right )\right ) \int \frac{\sin \left (\frac{a d}{b}+d x\right )}{a+b x} \, dx}{a^2}\\ &=\frac{d \cos (c) \text{Ci}(d x)}{a^2}+\frac{d \cos \left (c-\frac{a d}{b}\right ) \text{Ci}\left (\frac{a d}{b}+d x\right )}{a^2}-\frac{2 b \text{Ci}(d x) \sin (c)}{a^3}+\frac{2 b \text{Ci}\left (\frac{a d}{b}+d x\right ) \sin \left (c-\frac{a d}{b}\right )}{a^3}-\frac{\sin (c+d x)}{a^2 x}-\frac{b \sin (c+d x)}{a^2 (a+b x)}-\frac{2 b \cos (c) \text{Si}(d x)}{a^3}-\frac{d \sin (c) \text{Si}(d x)}{a^2}+\frac{2 b \cos \left (c-\frac{a d}{b}\right ) \text{Si}\left (\frac{a d}{b}+d x\right )}{a^3}-\frac{d \sin \left (c-\frac{a d}{b}\right ) \text{Si}\left (\frac{a d}{b}+d x\right )}{a^2}\\ \end{align*}
Mathematica [A] time = 1.95359, size = 184, normalized size = 0.98 \[ -\frac{-2 b \sin \left (c-\frac{a d}{b}\right ) \text{CosIntegral}\left (d \left (\frac{a}{b}+x\right )\right )-a d \cos \left (c-\frac{a d}{b}\right ) \text{CosIntegral}\left (d \left (\frac{a}{b}+x\right )\right )+a d \sin \left (c-\frac{a d}{b}\right ) \text{Si}\left (d \left (\frac{a}{b}+x\right )\right )-2 b \cos \left (c-\frac{a d}{b}\right ) \text{Si}\left (d \left (\frac{a}{b}+x\right )\right )+\frac{a \sin (c) (a+2 b x) \cos (d x)}{x (a+b x)}+\frac{a \cos (c) (a+2 b x) \sin (d x)}{x (a+b x)}-a d \cos (c) \text{CosIntegral}(d x)+a d \sin (c) \text{Si}(d x)+2 b \sin (c) \text{CosIntegral}(d x)+2 b \cos (c) \text{Si}(d x)}{a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.012, size = 256, normalized size = 1.4 \begin{align*} d \left ({\frac{1}{{a}^{2}} \left ( -{\frac{\sin \left ( dx+c \right ) }{dx}}-{\it Si} \left ( dx \right ) \sin \left ( c \right ) +{\it Ci} \left ( dx \right ) \cos \left ( c \right ) \right ) }+{\frac{{b}^{2}}{{a}^{2}} \left ( -{\frac{\sin \left ( dx+c \right ) }{ \left ( \left ( dx+c \right ) b+da-cb \right ) b}}+{\frac{1}{b} \left ({\frac{1}{b}{\it Si} \left ( dx+c+{\frac{da-cb}{b}} \right ) \sin \left ({\frac{da-cb}{b}} \right ) }+{\frac{1}{b}{\it Ci} \left ( dx+c+{\frac{da-cb}{b}} \right ) \cos \left ({\frac{da-cb}{b}} \right ) } \right ) } \right ) }+2\,{\frac{{b}^{2}}{d{a}^{3}} \left ({\frac{1}{b}{\it Si} \left ( dx+c+{\frac{da-cb}{b}} \right ) \cos \left ({\frac{da-cb}{b}} \right ) }-{\frac{1}{b}{\it Ci} \left ( dx+c+{\frac{da-cb}{b}} \right ) \sin \left ({\frac{da-cb}{b}} \right ) } \right ) }-2\,{\frac{b \left ({\it Si} \left ( dx \right ) \cos \left ( c \right ) +{\it Ci} \left ( dx \right ) \sin \left ( c \right ) \right ) }{d{a}^{3}}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin \left (d x + c\right )}{{\left (b x + a\right )}^{2} x^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.89511, size = 923, normalized size = 4.91 \begin{align*} \frac{{\left ({\left (a b d x^{2} + a^{2} d x\right )} \operatorname{Ci}\left (d x\right ) +{\left (a b d x^{2} + a^{2} d x\right )} \operatorname{Ci}\left (-d x\right ) - 4 \,{\left (b^{2} x^{2} + a b x\right )} \operatorname{Si}\left (d x\right )\right )} \cos \left (c\right ) +{\left ({\left (a b d x^{2} + a^{2} d x\right )} \operatorname{Ci}\left (\frac{b d x + a d}{b}\right ) +{\left (a b d x^{2} + a^{2} d x\right )} \operatorname{Ci}\left (-\frac{b d x + a d}{b}\right ) + 4 \,{\left (b^{2} x^{2} + a b x\right )} \operatorname{Si}\left (\frac{b d x + a d}{b}\right )\right )} \cos \left (-\frac{b c - a d}{b}\right ) - 2 \,{\left (2 \, a b x + a^{2}\right )} \sin \left (d x + c\right ) - 2 \,{\left ({\left (b^{2} x^{2} + a b x\right )} \operatorname{Ci}\left (d x\right ) +{\left (b^{2} x^{2} + a b x\right )} \operatorname{Ci}\left (-d x\right ) +{\left (a b d x^{2} + a^{2} d x\right )} \operatorname{Si}\left (d x\right )\right )} \sin \left (c\right ) - 2 \,{\left ({\left (b^{2} x^{2} + a b x\right )} \operatorname{Ci}\left (\frac{b d x + a d}{b}\right ) +{\left (b^{2} x^{2} + a b x\right )} \operatorname{Ci}\left (-\frac{b d x + a d}{b}\right ) -{\left (a b d x^{2} + a^{2} d x\right )} \operatorname{Si}\left (\frac{b d x + a d}{b}\right )\right )} \sin \left (-\frac{b c - a d}{b}\right )}{2 \,{\left (a^{3} b x^{2} + a^{4} x\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin{\left (c + d x \right )}}{x^{2} \left (a + b x\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]